﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace DetectingKinectSencor._10_ColorStream
{
    public class SnapshotManager : Notifier
    {
        //Constuctor
        public WriteableBitmap Bitmap { get; private set; }

        public void update(WriteableBitmap wBitmap)
        {
            if (wBitmap == null)
                return;

            Bitmap = wBitmap;

            // Update calls RaisePropertyChanged(from the Notifierclass) on the Bitmapproperty to 
            // signal that the bitmap has been updated.
            RaisePropertyChanged(() => Bitmap);
        }
    }
}
